import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';

const kAutoTranslate = 'k_auto_translate';

class JzxSettingsController extends GetxController {
  GetStorage box = GetStorage();
  var isOpen = false.obs;

  @override
  void onInit() {
    super.onInit();

    isOpen.value = box.read(kAutoTranslate) ?? false;
  }

  void openOrCloseAutoTranslate() {
    isOpen.toggle();
    box.write(kAutoTranslate, isOpen.value);
  }
}
